<template>
  <div class="main-content">
    <el-header><el-button class="el-button--primary add-btn" >添加产品</el-button></el-header>
    <el-table :data="productList" stripe border>
      <el-table-column prop="id" label="序号" align="center"></el-table-column>
      <el-table-column prop="model" label="产品型号" align="center"></el-table-column>
      <el-table-column prop="description" label="产品描述" align="center"></el-table-column>

      <el-table-column fixed="right" label="操作" align="center">
        <template v-slot:default="scope">
          <el-button @click="">编辑</el-button>
          <el-button @click="">删除</el-button>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
export default {
  name: "productManager",
  data() {
    return {
      productList: [
        {id: 1, model: "frozen", description: "冰柜"},
        {id: 2, model: "mt1", description: "零售柜"}
      ]
    }
  }
}
</script>

<style scoped>
.main-content {
  padding: 10px;
}
.add-btn {
  float: right;
}
</style>